package com.zj.service.bank;

import java.util.List;

import com.zj.model.BatchBankBody;
import com.zj.model.BatchBankHead;

public class BankUtil {

	
	//batch报文
	public static String[] buildBatchFtp(BatchBankHead head, List<BatchBankBody> list) {
		int size = list.size() + 1;
		String[] arrs = new String[size];
		for (int i = 0; i < size; i++) {
			if (i == 0) {
				arrs[i] = head.getZbs() + "|" + head.getZje() + "|" + head.getThirdName() + "|" + "摘要" + "|" + "Y";
			} else {
				BatchBankBody body = list.get(i - 1);
				arrs[i] = body.getBankNo() + "|" + body.getMoney() + "|" + body.getThirdPhone() + "|"
						+ body.getThirdLsh() + "|" + "摘要" + "|" + body.getName();
			}
		}
		return arrs;
	}
}
